#include "PO_MoM.h"
#include "Input.h"
#include "FillMatrix.h"
#include "SolveEquation.h"
#include "RadiationPattern.h"
#include <ctime>
#include <cmath>
#include <iostream>
using namespace std;

blitz::Array<Position3D,1> vWire;
blitz::Array<double,1> Pattern;
blitz::Array<dComplex,1> V,I;
Matrix2D Z;
int iWire;
double DeltaLength;
double WireRadius;
const double PI = 2*asin(1.0);
const double Epsilon = 8.854187817e-12;
const double Mu = 4e-7*PI;
const double C = 1/sqrt(Epsilon*Mu);
//const double Freq = 7*C/PI;
const double Freq = C;
const double Omega = 2*PI*Freq;
const double WaveNumber = Omega/C;
const double Eta = sqrt(Mu/Epsilon);


int main()
{
	cout<<"Time Begin:"<<endl;
	clock_t start,finish;

	start = clock();
	Initial();
	finish = clock();
	cout <<"Time for Initialing: "<< double(finish-start)/CLOCKS_PER_SEC<<"s"<<endl;

	start = finish;
	FillZ();
	finish = clock();
	cout <<"Time for Filling Impedance Matrix: "<< double(finish-start)/CLOCKS_PER_SEC<<"s"<<endl;

	FillV();
	start = finish;
 	GetI();
	finish = clock();
	cout <<"Time for Solving Equation: "<< double(finish-start)/CLOCKS_PER_SEC<<"s"<<endl;

	return 0;

}
